home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / vbasic / sndex / vbsndex.txt < prev   
Text File  |  1991-10-15  |  2KB  |  34 lines

  1. Greetings!
  2.  
  3.         There have been a lot of people asking how to create string
  4. functions for VB in Turbo Pascal for Windows.  Well, the answer actually
  5. lies in another DLL that I uploaded called VBPOINT.DLL (VBPTR.ZIP). This
  6. DLL contains a function LP2STR which copies the contents of a normal C
  7. type of string variable (LPSTR) into a VB string and returns it all as
  8. a string function.
  9.         What is not entirely obvious is that LP2STR can be called from
  10. C and Pascal as well.  All you need is the correct syntax and you can
  11. create string functions for VB, without the CDK.
  12.         VBSNDEX.DLL contains one exported function SOUNDEX which returns
  13. the Soundex code string for the string that is passed to the function. This
  14. has functionality itself and you can look at SOUNDEX.MAK for how to use the
  15. DLL.  I was trying to find something that would be useful but that would not
  16. take me too long to write in TPW.  I didn't want to obscure the point which
  17. is to create string functions for VB.
  18.         LP2STR takes a PChar and an integer as parmeters.  Therefore, your
  19. DLL must make use of the STRINGS unit.  LP2STR creates a VB string, copies
  20. your PChar into it and returns the handle to the new VB string.  This is
  21. what you return as your function result.  You are then free to destroy your
  22. string (although it will go away when your VB app terminates).  Hope this
  23. is not too convoluted.  Let me know if you have questions.
  24.  
  25. Jonathan Zuck
  26. User Friendly, Inc.
  27.  
  28. You are hereby granted liscence to make use of and distribute VBSNDEX.DLL
  29. without compensation to UFI.  VBSNDEX.PAS must be distributed with this
  30. entire ZIP file (VBSNDEX.TXT, VBSNDEX.DLL, VBSNDEX.PAS).  These rights
  31. apply to programming and distribution only, not publication of any of the
  32. code or text contained here.  Call us at (202) 387 - 1949 if you have
  33. questions regarding this liscence.
  34.